﻿using HoverTree.HoverTreeFrame.HvtImage;
using HoverTree.Model;
using System.Collections.Generic;
using System.Web.UI.WebControls;

namespace HoverTree.IDAL
{
    public interface IPicture
    {
        string Add(PictureInfo picInfo,FileUpload fileUpload);
        string Add(PictureInfo picInfo, FileUpload fileUpload, HvtPicConfig config);
        PictureInfo Get(PictureSelect pictureSelect);
        List<PictureInfo> HvtPageQuery(PictureSelect pictureSelect, int sortType, int pageSize, int pageIndex, out int totalCount, out int totalPageCount);
        string ReUpload(PictureInfo pictureInfo,FileUpload fileUpload);

        string ReUpload(PictureInfo pictureInfo, FileUpload fileUpload, HvtPicConfig config);

        string AlterInfo(PictureInfo pictureInfo);

        /// <summary>
        /// 上一个
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        PictureInfo GetLastPublic(PictureInfo info);

        /// <summary>
        /// 下一个
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        PictureInfo GetNextPublic(PictureInfo info);

        /// <summary>
        /// 设置为封面,只有公开的图片才可以设置为封面
        /// </summary>
        /// <returns></returns>
        string SetCover(PictureSelect select);

        /// <summary>
        /// 用于图片集列表
        /// </summary>
        /// <param name="pictureSelect"></param>
        /// <param name="sortType"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="totalCount"></param>
        /// <param name="totalPageCount"></param>
        /// <returns></returns>
        List<PictureInfo> GetListWithImageSetTitle(PictureSelect pictureSelect, int sortType, int pageSize, int pageIndex, out int totalCount, out int totalPageCount);

        /// <summary>
        /// 获取所有公开的图片
        /// </summary>
        /// <returns></returns>
        List<PictureInfo> GetAllPublic();

        /// <summary>
        /// 生成图集中全部公开的图片
        /// </summary>
        /// <param name="imageSetID"></param>
        /// <returns></returns>
        List<PictureInfo> GetAllPublic(int imageSetID);
    }
}